/******************************************************************************
COPYRIGHT (C) 2013 by IT-Designers GmbH

File:		HsvImage.cpp
Created:	08.03.2013
Modified:	08.03.2013
Author:		Max Pejs
******************************************************************************/

#include "HsvImage.h"

HsvImage::HsvImage(Mat & rgbImg)
{
	Mat hsvImage;
	CV_FUNCNAME("Ctor: HsvImage(Mat & rgbImg)");
    __CV_BEGIN__;
	CV_ASSERT( (rgbImg.channels() == 3) );
	cvtColor(rgbImg, hsvImage, CV_BGR2HSV);
	split(hsvImage, HsvSplit);
	__CV_END__;
}

HsvImage::~HsvImage(){}

Mat & HsvImage::Hue(void)
{
	return HsvSplit[0];
}

Mat & HsvImage::Saturation(void)
{
	return HsvSplit[1];
}
Mat & HsvImage::Value(void)
{
	return HsvSplit[2];
}
